const { Sequelize, Model } = require('sequelize')
const { sequelize } = require('../../core/db')

class HomeLink extends Model {}

HomeLink.init({
  id: {
    type: Sequelize.INTEGER,
    autoIncrement: true,
    primaryKey: true
  },
  title: Sequelize.STRING(100),
  linkUrl: Sequelize.STRING(100),
  imgSrc: Sequelize.STRING(300),
  orderNum: {
    type: Sequelize.INTEGER,
    defaultValue: 1
  }
}, {
  sequelize
})

module.exports = HomeLink